package com.asiainfo.ssm.execute.util;


import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.ai.appframe2.complex.tab.split.function.IFunction;

public class SMSIDFunctionImpl implements IFunction {
	public static transient Log log = LogFactory.getLog(SMSIDFunctionImpl.class);
	@Override
	public String convert(Object obj) throws Exception {
		String string = obj.toString(); 
		long id = 	NumberUtils.toLong(string);
		return String.valueOf(id%50);
		  
	}
	
	public static void main(String[] args) throws Exception{
		SMSIDFunctionImpl impl = new SMSIDFunctionImpl();
		System.out.println(impl.convert(111110010101049L));
		System.out.println(impl.convert(1152));
		System.out.println(impl.convert(1113));
		System.out.println(impl.convert(1144));
		System.out.println(impl.convert(1149));
		System.out.println(impl.convert("1150"));
	}
}
